import Layout from '@/layout'

const systemRouter = {
  path: '/system',
  component: Layout,
  redirect: '/system/user',
  name: 'system',
  meta: {
    title: '系统管理',
    icon: 'setting',
    // 页面需要的权限
    roles: ['admin', 'system:list']
  },
  children: [
    {
      path: 'user',
      component: () => import('@/views/system/user/index'),
      name: 'User',
      meta: {
        title: '用户管理',
        icon: 'peoples',
        roles: ['admin', 'user:list']
      }
    },
    {
      path: 'real',
      component: () => import('@/views/system/real/index'),
      name: 'Real',
      meta: {
        title: '实名认证',
        icon: 'peoples',
        roles: ['admin', 'real:list']
      }
    },
    {
      path: 'role',
      component: () => import('@/views/system/role/index'),
      name: 'Role',
      meta: {
        title: '角色管理',
        icon: 'people',
        roles: ['admin', 'role:list']
      }
    },
    {
      path: 'menu',
      component: () => import('@/views/system/menu/index'),
      name: 'Menu',
      meta: {
        title: '菜单管理',
        icon: 'list',
        roles: ['admin', 'menu:list']
      }
    }
  ]

}

export default systemRouter
